#-------------------------------------------------------------------------------------------
# File:		trace.pm
# Author:	A.C. Verbeck
# Date:		October 9, 2013
# Version:	1
# Summary:	trace module
# Description:
#			This is a simple perl trace module.
#
# $Id: trace.pm 243 2014-02-09 08:03:29Z ac.verbeck@gmail.com $
#-------------------------------------------------------------------------------------------
#	Copyright and Disclaimer Notice
#
#	Copyright (c) 2013-2014 A.C. Verbeck
#
#	This file is part of perl-base: AWK-like processing system
#
#	perl-base is free software: you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation, either version 3 of the License, or
#	(at your option) any later version.
#
#	perl-base is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with perl-base. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------------------
	package trace;

	use strict;
	use warnings;
	use Exporter;
	use vars qw($VERSION @ISA @EXPORT);

	$VERSION = '1.0.0';
	@ISA	= qw(Exporter);
	@EXPORT = qw(trace_init trace);

	my $verbose = 0;

#-------------------------------------------------------------------------------------------
#	subroutines
#-------------------------------------------------------------------------------------------
sub trace_init
{
	$verbose = shift(@_);
}

sub trace
{
	my $p = shift(@_);
	if ($verbose == 1) { print "$p\n"; }
}

#-------------------------------------------------------------------------------------------
#	return status for module load
#-------------------------------------------------------------------------------------------
	return 1;

#
# End: trace.pm
#
